# https://www.baidu.com/s?wd=%E8%80%81%E5%BC%A0%E5%BC%80%E8%BD%A6&rsv_spt=1&rsv_iqid=0xeb7b0be700f9c109&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_dl=ib&rsv_sug3=19&rsv_sug1=13&rsv_sug7=100&rsv_sug2=0&rsv_btype=i&inputT=4629&rsv_sug4=5471&rsv_sug=1
import urllib.parse
s1 = '%E8%80%81%E5%BC%A0%E5%BC%80%E8%BD%A6'
print(urllib.parse.unquote(s1))

# s2 = '我爱北京天安门'
#urlencode是直接把参数和值都转换了
s2 = {'qs':'我爱北京','start':10,'test':'abc'}
print(urllib.parse.urlencode(s2))